import Vue from 'vue'


//安装ajax
import vueResource from 'vue-resource'
Vue.use(vueResource); 

//安装mint-ui 组件
import Mint from 'mint-ui';
Vue.use(Mint);
import 'mint-ui/lib/style.css';

import App from './App.vue'
import Home from "./components/Home/Home.vue"
import member from "./components/member/member.vue"
import shopcar from "./components/shopcar/shopcar.vue"
import search from "./components/search/search.vue"
import newlist from "./components/new/newlist.vue"
import newsinfo from "./components/new/newsinfo.vue"
import photolist from "./components/photo/photolist.vue"
import photoinfo from "./components/photo/photoinfo.vue"
import goodslist from "./components/goods/goodslist.vue"
import goodsinfo from "./components/goods/goodsinfo.vue"
import goodsbuy from "./components/goods/goodsbuy.vue"
import goodscomment from "./components/goods/goodscomment.vue"


//安装路由
import vueRouter from 'vue-router'
Vue.use(vueRouter);
var router = new vueRouter({
	linkActiveClass:"mui-active",
  routes: [
    {path: '/', redirect: '/Home'},
    {name:'home',path:'/Home',component:Home},
    {name:'member',path:'/member',component:member},
    {name:'shopcar',path:'/shopcar',component:shopcar},
    {name:'search',path:'/search',component:search},
    {name:'newlist',path:'/new',component:newlist},
    {name:'newinfo',path:'/new/:id',component:newsinfo},
    {name:'photolist',path:'/photo',component:photolist},
    {name:'photoinfo',path:'/photo/:id',component:photoinfo},
    {name:'goodslist',path:'/goods/',component:goodslist},
    {name:'goodsbuy',path:'/goods/:id',component:goodsbuy},
    {name:'goodsinfo',path:'/goodsinfo/:id',component:goodsinfo},
    {name:'goodscomment',path:'/goodscomment/:id',component:goodscomment}
    
    
  ]
})

//安装mui 组件
//import mui from 'vue-mui'
//Vue.use(mui);
import '../statics/mui/css/mui.css'
import '../statics/mui/css/icons-extra.css'
//import '../statics/mui.min.css'


//安装时间 过滤器http://momentjs.cn/
import  moment from "moment"
Vue.filter("time",function(value,timestyle){
	return  moment(value).format(timestyle)
})

//移动端Vue.js图片预览插件
import vuePicturePreview from 'vue-picture-preview'
Vue.use(vuePicturePreview)



new Vue({
  el: '#app',
  router,
  render: h => h(App)
})
